﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TestMutuallyExclusiveListboxesExtender._Default" %>
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="cc1" %>
<%@ Register Assembly="xListBox" Namespace="xListControls" TagPrefix="cc1" %>
<%@ Register Assembly="MutuallyExclusiveListboxesExtender" Namespace="MutuallyExclusiveListboxes"
    TagPrefix="cc2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Test Page</title>
</head>
<body>

    <h1>Mutually Exclusive Listboxes Extender Test</h1>
    <form id="form1" runat="server">
    <div>
        <cc1:ScriptManager ID="ScriptManager1" runat="server">
        </cc1:ScriptManager>
        
        <table border="0" cellpadding="5">
            <tr>
                <td>
                    Listbox A <br />
                    <cc1:xListBox ID="XListBoxA" runat="server" Rows="15" Width="175px" 
                        SelectionMode="Multiple">
                    <asp:ListItem Text="A" Value="a"></asp:ListItem>
                    <asp:ListItem Text="B" Value="b"></asp:ListItem>
                    <asp:ListItem Text="C" Value="c"></asp:ListItem>
                    <asp:ListItem Text="D" Value="d"></asp:ListItem>
                </cc1:xListBox></td>
                <td>
                    <asp:Button ID="btnRight" runat="server" Text="Add ->" Width="100px" /><br />&nbsp;<br />
                    <asp:Button ID="btnLeft" runat="server" Text="<- Remove" Width="100px" />
                    
                </td>
                <td>
                    Listbox B <br />
                    <cc1:xListBox ID="XListBoxB" runat="server" Rows="15" Width="175px" 
                        SelectionMode="Multiple"></cc1:xListBox>
                </td>
            </tr>
        </table>
        <br />&nbsp;<br />
        <cc2:MutuallyExclusiveListboxesExtender ID="MutuallyExclusiveListboxesExtender1" TargetControlID="XListBoxA" 
        ButtonLeft="btnLeft" ButtonRight="btnRight" ListboxB="XListBoxB" runat="server">
        </cc2:MutuallyExclusiveListboxesExtender>
        <asp:Button ID="btnSubmit" runat="server" Text="Submit" 
            onclick="btnSubmit_Click" />
            
        <hr />
        <h3>After Submit:</h3>
        <b>Contents of Listbox A:</b> <asp:Label ID="lblListboxA" runat="server" Text=""></asp:Label><br />
        <b>Contents of Listbox B:</b> <asp:Label ID="lblListboxB" runat="server" Text=""></asp:Label>
    </div>
    
    </form>
</body>
</html>
